package site.shenjie.eureka.ribbon.feign.client;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {
    @Autowired
    private UserRemoteClient userRemoteClient;

    @RequestMapping("/index")
    public String index() {
        // 这边就像调用本地方法一样调用其他服务里的接口
        String result = userRemoteClient.index();
        System.out.println("调用结果：" + result);
        return result;
    }
}
